<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;
use App\Repository\RolePermissionRepository;

/**
 * RolePermission
 *
 * @ORM\Table(name="role_permission", indexes={@ORM\Index(name="idx_permission_id", columns={"permission_id"}), @ORM\Index(name="idx_role_id", columns={"role_id"})})
 * @ORM\Entity(repositoryClass=RolePermissionRepository::class)
 */
class RolePermission
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer", nullable=false, options={"comment"="自增主键"})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var int
     *
     * @ORM\Column(name="role_id", type="integer", nullable=false, options={"comment"="规则ID"})
     */
    private $roleId = '0';

    /**
     * @var int
     *
     * @ORM\Column(name="permission_id", type="integer", nullable=false, options={"comment"="权限ID"})
     */
    private $permissionId = '0';

    /**
     * @var int
     *
     * @ORM\Column(name="create_user", type="integer", nullable=false, options={"comment"="创建人"})
     */
    private $createUser = '0';

    /**
     * @var int
     *
     * @ORM\Column(name="create_time", type="integer", nullable=false, options={"comment"="创建时间"})
     */
    private $createTime = '0';

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getRoleId(): ?int
    {
        return $this->roleId;
    }

    public function setRoleId(int $roleId): static
    {
        $this->roleId = $roleId;

        return $this;
    }

    public function getPermissionId(): ?int
    {
        return $this->permissionId;
    }

    public function setPermissionId(int $permissionId): static
    {
        $this->permissionId = $permissionId;

        return $this;
    }

    public function getCreateUser(): ?int
    {
        return $this->createUser;
    }

    public function setCreateUser(int $createUser): static
    {
        $this->createUser = $createUser;

        return $this;
    }

    public function getCreateTime(): ?int
    {
        return $this->createTime;
    }

    public function setCreateTime(int $createTime): static
    {
        $this->createTime = $createTime;

        return $this;
    }


}
